package com.erdos.common.util.log;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;


public class LogInitializeServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4709565751021033046L;
	

	/* (non-Javadoc)
	 * @see javax.servlet.GenericServlet#init()
	 */
	@Override
	public void init() throws ServletException {		
		System.out.println("SYSTEM is initializing the LOGGER configuration...");
		//Logger.init();
		Logger.logInfo("LOG4J was initialized!");
		try{
		Logger.logInfo("Logger is ready on machine " + java.net.InetAddress.getLocalHost().getHostAddress());
		}
		catch(java.net.UnknownHostException uhe)
		{
			uhe.printStackTrace();
			
		}
		catch(Exception e)
		{
			e.printStackTrace();
			
		}
	}

	/* (non-Javadoc)
	 * @see javax.servlet.GenericServlet#destroy()
	 */
	@Override
	public void destroy() {		
		System.out.println("SYSTEM is unbounding the LOGGER ...");
	}
	
	


	
}
